/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * TelaMenuCliente.java
 *
 * Created on Jul 8, 2010, 7:04:27 PM
 */

package telas;
import controladoras.apresentacao.CntrIntCliente;
/**
 *
 * @author thiagostuckert
 */
public class TelaMenuCliente extends javax.swing.JFrame {

    /** Creates new form TelaMenuCliente */
    public TelaMenuCliente() {
        initComponents();
    }

    private CntrIntCliente cntrIntCliente;

    public void setControladoraInteracao(CntrIntCliente cntr){
        cntrIntCliente = cntr;
    }
    /**
     * Seta o nome a ser mostrado na tela.
     * @param nomeParam Nome a ser mostrado na tela.
     */
    public final void setNome(final String nomeParam) {
        nome.setText(nomeParam);
    }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        fechar = new javax.swing.JButton();
        gerenciaDados = new javax.swing.JButton();
        gerenciaReserva = new javax.swing.JButton();
        consultaVoo = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        nome = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel1.setText("Menu Cliente");

        fechar.setText("Fechar");
        fechar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                fecharActionPerformed(evt);
            }
        });

        gerenciaDados.setText("Gerencia Dados");
        gerenciaDados.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gerenciaDadosActionPerformed(evt);
            }
        });

        gerenciaReserva.setText("Gerencia Reserva");
        gerenciaReserva.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gerenciaReservaActionPerformed(evt);
            }
        });

        consultaVoo.setText("Consulta Voo");
        consultaVoo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                consultaVooActionPerformed(evt);
            }
        });

        jLabel2.setText("Olá:");

        nome.setText("Nome do Cliente.");

        org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(133, 133, 133)
                        .add(fechar))
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(83, 83, 83)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(gerenciaDados)
                            .add(gerenciaReserva)
                            .add(consultaVoo)))
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(101, 101, 101)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jPanel1Layout.createSequentialGroup()
                                .add(jLabel2)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                                .add(nome))
                            .add(jPanel1Layout.createSequentialGroup()
                                .add(42, 42, 42)
                                .add(jLabel1)))))
                .addContainerGap(149, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .add(29, 29, 29)
                .add(jLabel1)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel2)
                    .add(nome))
                .add(18, 18, 18)
                .add(gerenciaDados)
                .add(18, 18, 18)
                .add(gerenciaReserva)
                .add(18, 18, 18)
                .add(consultaVoo)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 78, Short.MAX_VALUE)
                .add(fechar)
                .addContainerGap())
        );

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void fecharActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fecharActionPerformed
        cntrIntCliente.encerrarMenuCliente();
}//GEN-LAST:event_fecharActionPerformed

    private void gerenciaDadosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gerenciaDadosActionPerformed
        cntrIntCliente.gerenciaDados();
    }//GEN-LAST:event_gerenciaDadosActionPerformed

    private void gerenciaReservaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gerenciaReservaActionPerformed
        cntrIntCliente.gerenciaReserva();
    }//GEN-LAST:event_gerenciaReservaActionPerformed

    private void consultaVooActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_consultaVooActionPerformed
        cntrIntCliente.consultaVoo();
    }//GEN-LAST:event_consultaVooActionPerformed

   

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton consultaVoo;
    private javax.swing.JButton fechar;
    private javax.swing.JButton gerenciaDados;
    private javax.swing.JButton gerenciaReserva;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel nome;
    // End of variables declaration//GEN-END:variables

}
